package com.example.smart_lock_app.data.remote


import com.example.smart_lock_app.data.model.CommandResponse
import com.example.smart_lock_app.data.model.DeviceInfoResponse
import okhttp3.RequestBody
import retrofit2.Response
import retrofit2.http.*

interface OneNetApiService {

    @GET("/devices/{deviceId}")
    suspend fun getDeviceStatus(
        @Header("Authorization") apiKey: String,
        @Path("deviceId") deviceId: String
    ): Response<DeviceInfoResponse>

    @POST("/v1/synccmds")
    suspend fun sendCommand(
        @Header("Authorization") apiKey: String,
        @Query("device_id") deviceId: String,
        @Query("timeout") timeout: Int = 15,
        @Body command: RequestBody
    ): Response<CommandResponse>
}